package Day7;

public class Warcraft extends Aircraft {

    private int dan;
    public Warcraft(int weight, int height, int dan) {
        super(weight, height);
        this.dan = dan;
    }

    public int getDan() {
        return dan;
    }

    public void setDan(int dan) {
        this.dan = dan;
    }

    @Override
    public void fly() {
        System.out.println("战斗机起飞,当前自重是："+getWeight());
    }

    @Override
    public void speed() {
        System.out.println("战斗机加速,即将飞行高度是："+getHeight());
    }

    @Override
    public void land() {
        System.out.println("战斗机降落");
    }
    public int fa(){
        System.out.println("战斗机发射导弹");
        dan-=1;
        return dan;
    }
    public void di(){
        System.out.println("战斗机低空盘旋");
    }
    public void add(){
        fly();
        speed();
        land();
        fa();
        di();

    }
}
